/**
 * Hebrew Translations
 * By spartacus (from forums) 06-12-2007
 */

Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">...桢蝻</div>';

if(Ext.View){
  Ext.View.prototype.emptyText = "";
}

if(Ext.grid.Grid){
  Ext.grid.Grid.prototype.ddText = "?疳瑛妃 {0}";
}

if(Ext.TabPanelItem){
  Ext.TabPanelItem.prototype.closeText = "疋屮 禊屦辁";
}

if(Ext.form.Field){
  Ext.form.Field.prototype.invalidText = "潋 狴沅 驿 彘";
}

if(Ext.LoadMask){
  Ext.LoadMask.prototype.msg = "...桢蝻";
}

Date.monthNames = [
  "轲遴?,
  "翎帏",
  "铠?,
  "圄?,
  "钹?,
  "殄痖",
  "殄扉",
  "噱忮耔",
  "耵桀狲",
  "噱麒遽?,
  "疱犷狲",
  "泠钺?
];

Date.getShortMonthName = function(month) {
  return Date.monthNames[month].substring(0, 3);
};

Date.monthNumbers = {
  Jan : 0,
  Feb : 1,
  Mar : 2,
  Apr : 3,
  May : 4,
  Jun : 5,
  Jul : 6,
  Aug : 7,
  Sep : 8,
  Oct : 9,
  Nov : 10,
  Dec : 11
};

Date.getMonthNumber = function(name) {
  return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()];
};

Date.dayNames = [
  "?,
  "?,
  "?,
  "?,
  "?,
  "?,
  "?
];

Date.getShortDayName = function(day) {
  return Date.dayNames[day].substring(0, 3);
};

if(Ext.MessageBox){
  Ext.MessageBox.buttonText = {
    ok     : "嚅?,
    cancel : "衢桢?,
    yes    : "腼",
    no     : "爨"
  };
}

if(Ext.util.Format){
  Ext.util.Format.date = function(v, format){
    if(!v) return "";
    if(!(v instanceof Date)) v = new Date(Date.parse(v));
    return v.dateFormat(format || "d/m/Y");
  };
}

if(Ext.DatePicker){
  Ext.apply(Ext.DatePicker.prototype, {
    todayText         : "溟屙",
    minText           : ".?驿 珈 麇沩 禚帏殛 滗禚?麽?,
    maxText           : ".?驿 珈 爨瑛 潸帏殛 漶弭?麽?,
    disabledDaysText  : "",
    disabledDatesText : "",
    monthNames        : Date.monthNames,
    dayNames          : Date.dayNames,
    nextText          : '(Control+Right) 溏邈?溽?,
    prevText          : '(Control+Left) 溏邈?澉邈?,
    monthYearText     : '(灬玳 ?Control+Up/Down) 徵?珏泫',
    todayTip          : "铟?彗) {0})",
    format            : "d/m/Y",
    okText            : "&#160;嚅?#160;",
    cancelText        : "衢桢?,
    startDay          : 0
  });
}

if(Ext.PagingToolbar){
  Ext.apply(Ext.PagingToolbar.prototype, {
    beforePageText : "蝾邈",
    afterPageText  : "{0} 铤尻",
    firstText      : "蝾邈 ?,
    prevText       : "蝾邈 麇沩",
    nextText       : "蝾邈 溽?,
    lastText       : "蝾邈 噻?,
    refreshText    : "痫",
    displayMsg     : "铞殁 {0} - {1} 铤尻 {2}",
    emptyMsg       : '嚅?铋泸 熹鲡?
  });
}

if(Ext.form.TextField){
  Ext.apply(Ext.form.TextField.prototype, {
    minLengthText : "{0} 溧屮?漕轲轭囔?禊沅 驿 溴?,
    maxLengthText : "{0} 溧屮?漕轼衢 禊沅 驿 溴?,
    blankText     : "?驿 潆?,
    regexText     : "",
    emptyText     : null
  });
}

if(Ext.form.NumberField){
  Ext.apply(Ext.form.NumberField.prototype, {
    minText : "{0} 潋 漕轲轭囔?禊沅 驿 溴?,
    maxText : "{0} 潋 漕轼衢 禊沅 驿 溴?,
    nanText : "溴?爨 铖豇 {0}"
  });
}

if(Ext.form.DateField){
  Ext.apply(Ext.form.DateField.prototype, {
    disabledDaysText  : "铕彖",
    disabledDatesText : "铕彖",
    minText           : "{0} 潸帏殛 狴沅 驿 玳獒 熹殄?爨瑛",
    maxText           : "{0} 潸帏殛 狴沅 驿 玳獒 熹殄?祠痖",
    invalidText       : "{1} 溴?爨 ?痖 - 玳獒 熹殄?狒屮铊 {0}",
    format            : "m/d/y",
    altFormats        : "m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d"
  });
}

if(Ext.form.ComboBox){
  Ext.apply(Ext.form.ComboBox.prototype, {
    loadingText       : "...桢蝻",
    valueNotFoundText : undefined
  });
}

if(Ext.form.VTypes){
  Ext.apply(Ext.form.VTypes, {
    emailText    : '"user@domain.com" ?驿 鲽殛 熹殄?膪遽?沐帏 囔麒痖 狒屮铊',
    urlText      : '"http:/'+'/www.domain.com" ?驿 鲽殛 熹殄?膪遽?嚅痂?狒屮铊',
    alphaText    : '_?驿 殡屐 熹腴? 噱妃 ?,
    alphanumText : '_?驿 殡屐 熹腴? 噱妃, 铖豇轫 ?
  });
}

if(Ext.form.HtmlEditor){
  Ext.apply(Ext.form.HtmlEditor.prototype, {
    createLinkText : ':囵?澉煦 帔 膪遽?溧轲桫痂 蜥屮 澉轾屮',
    buttonTips : {
      bold : {
        title: '(Ctrl+B) 铄汊?,
        text: '.溷怡 帔 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      italic : {
        title: '(Ctrl+I) 痂彘',
        text: '.滂?帔 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      underline : {
        title: '(Ctrl+U) 麇 ',
        text: '.溴耋 黠  蜥屮 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      increasefontsize : {
        title: '溻沆 梓耔',
        text: '.溻沆 忮麸 蜥屮 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      decreasefontsize : {
        title: '澉栾 梓耔',
        text: '.澉栾 忮麸 蜥屮 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      backcolor : {
        title: '鲠??扈黢?,
        text: '.?帔 鲠?澍黩 蜥屮 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      forecolor : {
        title: '鲠?忮麸',
        text: '.?帔 鲠?溻弭?蜥屮 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      justifyleft : {
        title: '轾屮 禊钹?,
        text: '.轾?囔?帔 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      justifycenter : {
        title: '轾屮 祛?,
        text: '.轾?祛?帔 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      justifyright : {
        title: '轾屮 扉铋?,
        text: '.轾?轭轲?帔 滂黢?漯徵?,
        cls: 'x-html-editor-tip'
      },
      insertunorderedlist : {
        title: '轭?瘅邈妃',
        text: '.潸珈 轭?瘅邈妃',
        cls: 'x-html-editor-tip'
      },
      insertorderedlist : {
        title: '轭?铑羼豇?,
        text: '.潸珈 轭?铑羼豇?,
        cls: 'x-html-editor-tip'
      },
      createlink : {
        title: '鏖?,
        text: '.漪尻 帔 滂黢?漯徵?祺轾屮',
        cls: 'x-html-editor-tip'
      },
      sourceedit : {
        title: '蝤殡?麇?铟屮',
        text: '.漩?麇?铟屮',
        cls: 'x-html-editor-tip'
      }
    }
  });
}

if(Ext.grid.GridView){
  Ext.apply(Ext.grid.GridView.prototype, {
    sortAscText  : "铋轱 狁泺 蝈熹",
    sortDescText : "铋轱 狁泺 殄",
    lockText     : "痱?蝾邈?,
    unlockText   : " 蝾邈?,
    columnsText  : "蝾邈妃"
  });
}

if(Ext.grid.GroupingView){
  Ext.apply(Ext.grid.GroupingView.prototype, {
    emptyGroupText : '(?',
    groupByText    : '漩?狩徨鲥?祠??驿',
    showGroupsText : '漩?狩徨鲥?
  });
}

if(Ext.grid.PropertyColumnModel){
  Ext.apply(Ext.grid.PropertyColumnModel.prototype, {
    nameText   : "",
    valueText  : "蝤?,
    dateFormat : "m/j/Y"
  });
}

if(Ext.layout.BorderLayout.SplitRegion){
  Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, {
    splitTip            : ".铢尻 禊轲彘 忮沆",
    collapsibleSplitTip : ".铢尻 禊轲彘 忮沆. 扃轹?媵屐?熹聱"
  });
}
